package com.he.strategymodel.strategy.concretestrategy;

import com.he.strategymodel.strategy.StategyInterface;
import com.he.strategymodel.util.ConfigUtil;

/**
 * 折扣算法实现
 */
public class SaleStategyDiscount implements StategyInterface<Double> {
    /**
     * 折扣率
     */
    double discount;

    {
        discount = Double.valueOf(ConfigUtil.getValue("discount"));
    }


    @Override
    public Double stategy(Double originalMoney) {
        return originalMoney * discount;
    }
}
